<template>
  <div>
    setup {{ state.myname }} -- {{ state.myage }}
    <button @click="handleChange">change</button>
  </div>
  <div>我是兄弟节点</div>
</template>

<script>
import { reactive } from 'vue'

export default {
  setup () {
    console.log('setup')
    const state = reactive({
      myname: 'lisa',
      myage: 100
    })

    const handleChange = () => {
      state.myname = 'json'
      state.myage = 18
    }

    return {
      state,
      handleChange
    }
  }
}
</script>
